package com.pig4cloud.pig.trip.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.pig.common.security.util.SecurityUtils;
import com.pig4cloud.pig.trip.api.dto.InquireDTO;
import com.pig4cloud.pig.trip.api.dto.TripDTO;
import com.pig4cloud.pig.trip.api.entity.TrTrip;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TrTripMapper extends BaseMapper<TrTrip> {
	List<InquireDTO> getUnusedInquireList(Long id);

	// 修改Mapper接口，为isCustomerService添加@Param注解
	IPage<TripDTO> selectByCondition(
			@Param("page") Page page,
			@Param("inquireNumber") String inquireNumber,
			@Param("cusTel") String cusTel,
			@Param("trStatus") String trStatus,
			@Param("isService") String isService
	);
	InquireDTO getInquireBYId(@Param("inquireId")Long inquireId);

	int insertTrip(TrTrip trTrip);

	int deleteTrip(Long tripId);

    InquireDTO getInquireByTripId(Long tripId);

	int updateTripAmount(TripDTO tripDTO);
}
